package com.mobile.liuyi_s.orderlunch.testActivity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

import com.mobile.liuyi_s.orderlunch.MyApplication;
import com.mobile.liuyi_s.orderlunch.R;
import com.mobile.liuyi_s.orderlunch.entity.Version;

import java.util.List;

import cn.bmob.v3.BmobQuery;
import cn.bmob.v3.exception.BmobException;
import cn.bmob.v3.listener.FindListener;
import cn.bmob.v3.listener.SaveListener;

public class VersionTextActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_version_text);

//        BmobQuery<Version> query = new BmobQuery<>();
//        query.addWhereEqualTo("versionCode", 1);
//        query.findObjects(new FindListener<Version>() {
//            @Override
//            public void done(List<Version> list, BmobException e) {
//                int size = list.size();
//                if (size != 0) {
//                    double versionCode = list.get(0).getVersionCode();
//                    boolean active = list.get(0).isActive();
//                    Toast.makeText(VersionTextActivity.this, versionCode+" "+size+" "+active, Toast.LENGTH_SHORT).show();
//                }
//            }
//        });


    }
}
